package org.west.sky.frame.activiti.study.chapter14.demo0302;

import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.JavaDelegate;

import java.util.List;

/**
 * author: chz
 * date: 2025/4/11
 * description:
 */
public class DeductJavaDelegate implements JavaDelegate {
    @Override
    public void execute(DelegateExecution execution) {
        List<CostCalculation> list = (List) execution.getVariable("costCalculationResults");
        System.out.println("====折扣前金额：" + list.get(0).getOriginalPrice() + ",折扣率：" + list.get(0).getDiscountRate() + ",折扣后金额：" + list.get(0).getActualPrice());
    }
}
